
const recommendService = require('../service/recommendService')
module.exports = function(app) {
    app.get("/api/getRecommendPosts/:categoryId", async (req, res) => {
        let categoryId = req.params.categoryId
        console.log(`getRecommendPosts.........${categoryId}`)
        let data
        await recommendService.getPostsTitleInfo(categoryId)
                .then(info => {
                    data = info
                })
        res.send(data)
        return
    })
}